package com.lj.ljminsu.detail.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.core.JmsMessagingTemplate;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("demo")
@CrossOrigin
public class demo {
    @Autowired
    private JmsMessagingTemplate jmsMessagingTemplate;
    @RequestMapping("send")
    public String demo(){
        System.out.println("send");
        //jmsMessagingTemplate.convertAndSend("还不谢谢乌蝇锅???");
        jmsMessagingTemplate.convertAndSend("ljOrder","还不谢谢乌蝇锅???");
        return "hello";
    }
}
